home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 7358 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.6 KB

  1. Path: antares.dfma.com!news
  2. From: johnb@dfma.com (John Breckenridge)
  3. Newsgroups: comp.lang.pascal.misc,comp.lang.c++,comp.lang.c,comp.lang.pascal.borland
  4. Subject: Re: Tough FACTORIAL math problem...
  5. Date: Fri, 23 Feb 1996 00:38:45 GMT
  6. Organization: Boothroyd Dewhurst, Inc.
  7. Message-ID: <4gintg$1f7@antares.dfma.com>
  8. References: <4fr8be$ass@news.iconn.net> <4g0giv$94s@sun132.spd.dsccc.com> <4gbsir$opr@axl02it.ntc.nokia.com>
  9. NNTP-Posting-Host: johnb.dfma.com
  10. X-Newsreader: Forte Free Agent 1.0.82
  11.  
  12. Risto Lankinen <risto.lankinen@ntc.nokia.com> wrote:
  13.  
  14. >There is an algorithm that calculates the last non-zero _binary_ digit
  15. >of ANY factorial - with SUB-LOGARITHMIC time even in the worst case!!!
  16.  
  17. >Mail me if interested but be prepared to explain what you need it for.
  18. >The algorithm is indeed very VERY fast, and so I don't want to give it
  19. >away without being credited at least.  Also, please mention "rightmost
  20. >non-zero binary digit algorithm" in your request.
  21.  
  22. Since the ONLY non-zero binary digit is 1, that seems like a fairly
  23. trivial algorithm.  Why all the secrecy?
  24.  
  25. int nonzero_binary_digit(void)
  26. {
  27.     return 1;
  28. }
  29.  
  30. >terv: Risto
  31.  
  32. >-- 
  33. >Risto Lankinen / System Engineer  ***************************************
  34. >Nokia Telecommunications,         *  2                              2   *
  35. >Cellular Data; Helsinki, Finland. * 2 -1 is PRIME!  Now working on 2 +1 *
  36. >risto.lankinen@ntc.nokia.com      ***************************************
  37.  
  38.  
  39. John Breckenridge                                Boothroyd Dewhurst, Inc.
  40. johnb@dfma.com                                   all opinions are my own
  41.  
  42.